package com.ch.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.*;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Setter
@Getter
@TableName("`order`")
public class Order {
    @TableId(value = "id",type = IdType.AUTO)
    private int id;
    @TableField("`name`")
    private String name;
    private int price;
    @JsonIgnore
    private int uid;
    @TableField(exist = false)
    private User user;

    public Order(String name, int price) {
        this.name = name;
        this.price = price;

    }
}
